home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Demos / AppMaker 2.0b3 / Demo AppMaker 1.5 / Demo AppMaker™ / Demo AppMaker™.rsrc / TmPM_205_Dialog.inc < prev    next >
Encoding:
Text File  |  1992-04-08  |  1.8 KB  |  88 lines

  1. %if lang = MPW%
  2.     { %filename% -- dialog }
  3.     { Created %date% %time% by AppMaker }
  4. %endif%
  5.  
  6. const
  7.     %for each item gen itemNr%
  8.  
  9. %for each item gen classMethods%
  10. {$S ARes}
  11. {----------}
  12. Procedure T%dlogname%.DoChoice    (origView:        TView;
  13.                                  itsChoice:        integer); Override;
  14. var
  15.     origID:            IDType;
  16. Begin
  17.     origID := origView.fIdentifier;
  18.     %for each item gen doChoice%
  19.  
  20.     %if modalOneShot%
  21.         DismissDialog (origID);
  22.     %else%
  23.         inherited DoChoice (origView, itsChoice);
  24.     %endif%
  25. End; {DoChoice}
  26.  
  27. {$IFC qInspector}
  28. {$S AFields}
  29. {----------}
  30. Procedure T%dlogname%.Fields    (
  31.                 Procedure DoToField    (fieldName:        Str255;
  32.                                      fieldAddr:        Ptr;
  33.                                      fieldType:        integer)
  34.                                 ); Override;
  35. Begin
  36.     DoToField ('T%dlogname%', nil, bClass);
  37.     inherited Fields (DoToField);
  38. End; {Fields}
  39. {$ENDC}
  40.  
  41. %if modeless%
  42.     {$S AOpen}
  43.     {----------}
  44.     Function New%dlogname%:    TWindow;
  45.     var
  46.         theWindow:        TWindow;
  47.     Begin
  48.         theWindow := NewTemplateWindow (k%dlogname%ID, nil);
  49.  
  50.         if gDeadStripSuppression then begin
  51.             if Member (TObject (nil), T%dlogname%) then ;
  52.             %for each item gen gDeadStripSuppression%
  53.  
  54.         end;
  55.  
  56.         New%dlogname% := theWindow;
  57.     End; {New%dlogname%}
  58. %else%
  59.     {$S ASelCommand}
  60.     {----------}
  61.     Procedure Do%dlogname%;
  62.     var
  63.         aWindow:        TWindow;
  64.         aDialogView:    TDialogView;
  65.         dismisser:        IDType;
  66.     Begin
  67.         aWindow := NewTemplateWindow (k%dlogname%ID, nil);
  68.         {initialize subviews from current settings}
  69.         aDialogView := TDialogView (aWindow.FindSubView('dlog'));
  70.         dismisser := aDialogView.PoseModally;
  71.         if dismisser <> aDialogView.fCancelItem then begin
  72.             {use new settings from subviews}
  73.         end;
  74.         aWindow.Close;
  75.  
  76.         if gDeadStripSuppression then begin
  77.             if Member (TObject (nil), T%dlogname%) then ;
  78.             %for each item gen gDeadStripSuppression%
  79.  
  80.         end;
  81.  
  82.     End; {Do%dlogname%}
  83. %endif%
  84. %If lang = MPW%
  85.  
  86.     {End %filename%}
  87. %endif%
  88.